/*
 * animation.h
 *
 *  Created on: 28-apr-2009
 *      Author: fabrizio
 */
/*

 Copyright (c) 2008-2009 Fabrizio Pistonesi

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

 */

#ifndef ANIMATION_H_
#define ANIMATION_H_

#include <vector>

#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;


class Animation
{
public:
  Animation(IrrlichtDevice *device, u32 life, vector3df rotation, stringc sprites, s32 tpf, bool loop);
  IrrlichtDevice *Device;
  std::vector<ISceneNodeAnimator *> IrrAnimation; //to be attached to the patch

  u32 Life; // life in ms of the object before it disappear
  vector3df Rotation; // rotations per second
  stringw Sprites; // folder containing the sequence of the images
  s32 TimePerFrame;
  bool Loop;

  void serialize(IAttributes *attributes);

  virtual
  ~Animation();
};

#endif /* ANIMATION_H_ */
